package com.yaoyong.yy_demo.module.security;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @author 86188
 */
public class MyPasswordEncoder implements PasswordEncoder {

    @Override
    public String encode(CharSequence rawPassword) {
        return rawPassword.toString();
    }

    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        //密码以明文方式匹配
        return encodedPassword.equals(rawPassword.toString());
    }
}
